from Base import message, intersect, SS_VALID
from DRG import MDCD_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["01.2502","01.5102","01.5900x030","01.5900x032","01.5900x040","01.5900x048","01.5900x049","01.5902","01.5905","01.5910","01.5912","01.5918","01.5919","01.5926","01.5928","01.5931","01.5932","01.5936","01.5937","01.5938","01.5939","02.1211","02.1212","02.1300x001","04.0200x006","04.0700x031","04.0700x035","04.0700x036","04.0700x037","04.0700x038","04.0700x039","04.0700x040","04.0700x041","04.0700x042","04.4102","07.7200x003","16.1x02","16.9201","29.3900x001","29.3903"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合DB1入组条件，匹配规则：主手术匹配')

    if MDCD_DRG.DB19_group(record):
      return 'DB19'
        
    return 'DB1'
  else:
    return ''
    
